<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="font_3702579_4ygcdyap1tu/iconfont.css">
    <title>20302120102-康明宇</title>
    <link rel="stylesheet" href="swiper-8.3.0/swiper/swiper-bundle.min.css">
    <link rel="stylesheet" href="CSS/xxym.css">
</head>
<body>
    <div id="img">
        <div class="swiper mySwiper">
            <div class="swiper-wrapper">
              <div class="swiper-slide">
                <img src="image/xxym/sptp1.jpg" alt="">
              </div>
              <div class="swiper-slide">
                <img src="image/xxym/sptp2.jpg" alt="">
              </div>
              <div class="swiper-slide">
                <img src="image/xxym/sptp3.jpg" alt="">
              </div>
              <div class="swiper-slide">
                <img src="image/xxym/spjs.jpg" alt="">
              </div>
              <div class="swiper-slide">
                <img src="image/xxym/spjs8.jpg" alt="">
              </div>
              <div class="swiper-slide">
                <img src="image/xxym/spjs6.jpg" alt="">
              </div>
              <div class="swiper-slide">
                <img src="image/xxym/sptp4.jpg" alt="">
              </div>
              <div class="swiper-slide">
                <img src="image/xxym/spjs4.jpg" alt="">
              </div>
              <div class="swiper-slide">
                <img src="image/xxym/spjs10.jpg" alt="">
              </div>
              <div class="swiper-slide">
                <img src="image/xxym/spjs9.jpg" alt="">
              </div>
            </div>
            <div class="swiper-pagination"></div>
          </div>      
    </div>

    <div id="spxx">
        <div class="tltle"><h1><span>￥</span>49</h1></div>
        <div class="yhq">30元立减券<span>领券></span></div>
        <div class="spm"><p><span>自营</span>志高（CHIGO） 取暖器电暖器电暖气 办公室卧室家用暖风机电暖风便携式立卧两用暖气机  ZNB-18X5【厂直】</p>
            <span class="iconfont icon-shoucang">收藏</span><span class="iconfont icon-fenxiang">分享</span>
        </div>
    </div>

    <div id="spgg">
        <p><span>已选</span><select>
            <option value="">【遥控款+石墨烯+可加湿】</option>
            <option value="">【广角送风】暖风机 镇店爆款</option>
            <option value="">【机械款】PTC陶瓷发热体</option>
            <option value="">【机械款+石墨烯】</option>
            </select>,1件</p>
        <p><span>物流</span>现货，现在至明日前完成下单预计两天之内发货</p>
        <p><span>配送至————————————</span></p>
        <p><span>服务</span>7天无理由退货·包邮·厂商供应商配送</p>
    </div>

    <div id="sppj">
        <p>商品评价<span>(1000+)</span><span class="span">好评度96%</span></p>
        <p><img src="image/xxym/sppj.png" alt=""></p>
    </div>

    <div id="dpm">
        <img src="image/xxym/dptb.png" alt="">
            <div class="ftext">
                <h6>志高（CHIGO）厨房小电直营旗舰店</h6>
                <span>粉丝数269</span>
                <a href="###"><span class="jdgg">进店逛逛</span></a>
            </div>
    </div>

    <div id="sqj">
        <p><h3>省钱节</h3><span>天天特价全网最低价>></span><span class="span2">></span></p>
    </div>

    <div id="hhtj">
        <p>好货推荐</p>
        <div class="sp">
            <div class="box2">
                <!-- JSON -->
            </div>
        </div>
    </div>

    <div id="spxq">
        <p>商品详情</p>
        <img src="image/xxym/spjs.jpg" alt="">
        <img src="image/xxym/spjs2.jpg" alt="">
        <img src="image/xxym/spjs3.jpg" alt="">
        <img src="image/xxym/spjs4.jpg" alt="">
        <img src="image/xxym/spjs5.jpg" alt="">
        <img src="image/xxym/spjs6.jpg" alt="">
        <img src="image/xxym/spjs7.jpg" alt="">
        <img src="image/xxym/spjs8.jpg" alt="">
        <img src="image/xxym/spjs9.jpg" alt="">
        <img src="image/xxym/spjs10.jpg" alt="">
        <img src="image/xxym/spjs11.jpg" alt="">
        <img src="image/xxym/spjs12.jpg" alt="">
        <img src="image/xxym/spjs13.jpg" alt="">
        <img src="image/xxym/spjs14.jpg" alt="">
    </div>

    <div id="foot">
        <ul>
            <li><a href="#"><h1 class="iconfont icon-kefu"></h1>客服</a></li>
            <li><a href="#"><h1 class="iconfont icon-dianpu"></h1>进店</a></li>
            <li><a href="#"><h1 class="iconfont icon-gouwuche1"></h1>购物车</a></li>
        </ul>
        <span class="span1"><a href="#">加入购物车</a></span><span class="span2"><a href="#">立即购买</a></span>
    </div>
    <script src="swiper-8.3.0/swiper/swiper-bundle.min.js"></script>

    <script>

    var swiper = new Swiper(".mySwiper", {
        pagination: {
          el: ".swiper-pagination",
          type: "fraction",
        },
      });

        var xhr = new XMLHttpRequest();
        xhr.open("get", "/JSON/xxym.json", true);
        xhr.send();
        xhr.onreadystatechange = function () {
        if (xhr.readyState == 4 && xhr.status == 200) {
          var data = JSON.parse(xhr.responseText);
          // 2.渲染数据
          var str = "";
          for (var i = 0; i < data.length; i++) {
            str += `
            <div>
                    <img src="${data[i].img}" alt="">
                    <p class="sp">${data[i].sp}(AUX...</p>
                    <p class="jg">￥<span>${data[i].jg}</span></p>
                </div>
            `;
          }
          document.querySelector(".box2").innerHTML += str;
        }
      };
    </script>
</body>
</html>